<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class Logs extends Model {

	public $timestamps = false;  //关闭自动更新时间戳

	protected $table = 'logs';

	protected $fillable = ['user_id', 'module', 'action', 'message', 'ip', 'create_time', 'level'];

	public function user() {
		//模型 user主键  log外键
		return $this->hasOne('App\Models\User', 'id', 'user_id');
	}
}
